﻿using System.Drawing;
using System.Windows.Forms;

namespace DataVisualizers
{
    public partial class ArrayForm : Form
    {
        public ArrayForm() 
            : this(new double[100], 10)
        {
        }

        public ArrayForm(double[] formData, int imageWidth)
        {
            InitializeComponent();

            var width = imageWidth;
            var height = formData.Length/imageWidth;

            var bitmap = new Bitmap(width, height);

            pbxImageData.Image = bitmap;

            ImageTools.WriteToGrayscaleBitmap(formData, ref bitmap);
        }

    }
}
